/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bash.compta.data;

import com.bash.compta.db4o.MagicData;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author bash
 */
public class Recapitulatif {

    private List<CategorieDepense> categoriesDepenses;
    private List<Double> montantsUSD;
    private List<Double> montantsCDF;
    private int exercice;

    public List<List<String>> getTotalOf() {

        List out = new ArrayList();
        List<String> line;
        double totalOfCategorieUSD = 0;
         double totalOfCategorieCDF= 0;

        for (CategorieDepense c : categoriesDepenses) {

            line = new ArrayList();
            List<Depense> deps = MagicData.getAllDepenseWhereCategoryCompteLike(c.getLibele());

            for (Depense dep  : deps) {
                totalOfCategorieUSD+=dep.getMontant();
                  totalOfCategorieCDF+=dep.getMontantCDF();
            }


            line.add(c.getLibele());


        }

        return out;

    }
}
